﻿<%@ Page Title="" Language="C#" MasterPageFile="~/SiteAdmin/MasterPage.master" AutoEventWireup="true" CodeFile="TaskSearch.aspx.cs" Inherits="PMSWeb_TaskSearch" %>

<%@ Register src="TaskPersonItem.ascx" tagname="TaskPersonItem" tagprefix="uc1" %>
<%@ Register src="GoodItemOut.ascx" tagname="GoodItemOut" tagprefix="uc1" %>
<%@ Register src="../Controls/TipMessage/TipMessage.ascx" tagname="TipMessage" tagprefix="uc1" %>
<%@ Register src="ValidateUser.ascx" tagname="ValidateUser" tagprefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="contentPlaceHolderID" Runat="Server">
<uc1:TipMessage ID="tipMessage1" runat="server" Style="width:95%;"/>

<asp:Panel ID="pnlEdit" runat="server" Width="95%" CssClass="centerPanel">
    <div class="searchDiv" >
           <table cellspacing="0" class="searchTable">
            <tr>
                <td>
                任务单号：
                </td>
                <td>
                <asp:TextBox ID="S_TaskCode" runat="server" CssClass="smallInput" Width="200" MaxLength="64" ></asp:TextBox>
                </td> 
                <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Button ID="Button1" runat="server" OnClick="btnSearch_Click" Text=" 1.查询 "  CssClass="searchButton" />
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                
                <asp:Button ID="Button2" runat="server" OnClick="btnDocument_Click" Text=" 2.导出 "  CssClass="searchButton" /> 
                 </td>
            </tr> 
            </table>
     </div>
    
   <asp:Panel ID="pnlTaskInfo" runat="server">
        <div class="webPanelBorder" >
        <div class="webPanelCaption">受理信息</div>
        <div class="webPanelContent">
             <table cellspacing="1" class="table">
                <tr>
                    <td class="tableSubjectWidth">单位/用户：
                    </td>
                    <td><asp:Literal ID="tbGuest" runat="server" ></asp:Literal>
                    </td>                    
                </tr>
                <tr> 
                    <td class="tableSubjectWidth">联系电话：
                    </td>
                    <td><asp:Literal ID="tbPhone" runat="server"></asp:Literal>
                    </td>
                </tr>
                <tr> 
                    <td>楼号/区域：
                    </td>
                    <td><asp:Literal ID="cbHouseNo" runat="server"></asp:Literal>
                    </td>
                </tr>     
                <tr> 
                    <td>房间号：
                    </td>
                    <td ><asp:Literal ID="tbRoomNo" runat="server"></asp:Literal>
                    </td>
                </tr>             
                <tr>
                    <td>事由(要求)：</td>
                    <td><asp:Literal ID="tbTroubleDescription" runat="server" ></asp:Literal>
                    <br />
                    受理人：<asp:Label ID="lbUserID" runat="server" Text=""></asp:Label>&nbsp;
                    经办部门：<asp:Label ID="lbOrgID" runat="server" Text=""></asp:Label>&nbsp;
                    受理时间：<asp:Label ID="lbCreateDate" runat="server" Text=""></asp:Label>                    
                    </td>
                </tr>
                <tr> 
                    <td>是否领取物料：
                    </td>
                    <td ><asp:CheckBox ID="cbIsReqGood" runat="server" Enabled="false" Text="选择后在库房自动产生出库单"></asp:CheckBox>
                    </td>
                </tr>   
              <tr>
                    <td class="tableSubjectWidth">到达时间：</td>
                    <td><asp:TextBox ID="DepTime" onfocus="calendar.ShowCaltable(this, event);" runat="server" CssClass="shortInput" Width="100" MaxLength="19"></asp:TextBox>
                        <asp:TextBox ID="ddlDepHH" runat="server" CssClass="shortInput" Width="30" MaxLength="2"></asp:TextBox>
                        <asp:TextBox ID="ddlDepMM" runat="server" CssClass="shortInput" Width="30" MaxLength="2"></asp:TextBox>
                        <ofcc:RequiredField ID="RequiredField4" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td>完成时间：</td>
                    <td><asp:TextBox ID="ArrTime" onfocus="calendar.ShowCaltable(this, event);" runat="server" CssClass="shortInput" Width="100" MaxLength="19"></asp:TextBox>
                        <asp:TextBox ID="ddlArrHH" runat="server" CssClass="shortInput" Width="30" MaxLength="2"></asp:TextBox>
                        <asp:TextBox ID="ddlArrMM" runat="server" CssClass="shortInput" Width="30" MaxLength="2"></asp:TextBox> 
                        <ofcc:RequiredField ID="RequiredField5" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td>非工作时间：<ofcc:ToolTip CssClass="tip" ToolTip="用于计算工时使用，工时结果=完成时间-开始时间-非工作时间"  ID="ToolTip1" runat="server" /></td>
                    <td>
                        <asp:TextBox ID="ddlHHdis" runat="server" CssClass="shortInput" MaxLength="3"></asp:TextBox>
                        (单位/小时)
                    </td>
                </tr>           
                <tr>
                    <td>处理情况：</td>
                    <td><asp:TextBox ID="tbHandling" runat="server" CssClass="shortInput" Rows="5" MaxLength="40" TextMode="MultiLine"></asp:TextBox>                  
                    </td>
                </tr>         
                <tr>
                    <td>用户意见：</td>
                    <td> 
                    <ofcc:RadioButtonList ID="radioButtonList" RepeatDirection="Horizontal" runat="server" Width="40%" ></ofcc:RadioButtonList> 
                     </td> 
                </tr>
             </table>  
        </div> 
        </div>
        <uc1:ValidateUser ID="ValidateUser2" runat="server" />
        <div class="webPanelBorder">
           <div class="webPanelCaption">
                <asp:Label ID="showTitle" runat="server" Text="领单人员"></asp:Label>
           </div>
            <div class="webPanelContent">
                <ofcc:GridView ID="gridReceiverView" runat="server" AutoGenerateColumns="False">
                <Columns>        
                    <asp:BoundField DataField="OrgName" HeaderText="单位" />
                    <asp:BoundField DataField="UserName" HeaderText="姓名" />
                    <asp:BoundField DataField="GroupName" HeaderText="组别" />
                    <asp:BoundField DataField="Mobile" HeaderText="电话" />
                    <asp:BoundField DataField="Description" HeaderText="备注" />
                </Columns>
                </ofcc:GridView> 
            </div>
            <asp:HiddenField ID="hfCurrentGroupCode" runat="server" />
        </div>
        
        <asp:UpdatePanel runat="server" ID="UpdatePanel1">
            <ContentTemplate> 
                <uc1:TaskPersonItem ID="TaskPersonItem" runat="server" ShowTitle="工作人员" /> 
                <asp:Panel ID="pnlSearchPerson" runat="server" Visible="false">
                        <span style="float:left">人员编码:&nbsp;<ofcc:ToolTip CssClass="tip" ToolTip="扫描或者输入编码后按回车"  ID="ToolTip2" runat="server" />
                        &nbsp;&nbsp;<asp:TextBox ID="tbPersonCode" runat="server" CssClass="smallInput"></asp:TextBox></span>
                        <script type="text/javascript">
                            function pageLoad() {
                                $get('<%=tbPersonCode.ClientID%>').focus();
                            }
                        </script>
                </asp:Panel>
            </ContentTemplate>
        </asp:UpdatePanel>
 
        <asp:Panel ID="pnlTaskPerson" runat="server"></asp:Panel> 
   
   </asp:Panel> 
   <asp:Panel ID="pnlToolbar" runat="server">
    <div class="webPanelButtonArea">  
        <ofcc:LinkButton ID="btnSearchPerson" runat="server" OnClick="btnSearchPerson_Click" CssClass="linkButton" >扫描人员</ofcc:LinkButton>
        <ofcc:LinkButton ID="btnSelect" runat="server" OnClick="btnSelect_Click" CssClass="linkButton" >选择人员</ofcc:LinkButton> 
        <ofcc:LinkButton ID="btnSave" runat="server" OnClick="btnSave_Click" CssClass="linkButton" ValidationGroup="submit">完成</ofcc:LinkButton>
    </div> 
    </asp:Panel>
</asp:Panel> 

<iframe id="ifdown" src="" style="display:none;" runat="server"></iframe>
<asp:HiddenField ID="hfAddOrEdit" runat="server" />
<asp:HiddenField ID="hfTaskID" runat="server" /> 
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="DepTime"
    Display="None" ErrorMessage="请输入到达时间(日期)" ValidationGroup="submit"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="ArrTime"
    Display="None" ErrorMessage="请输入完成时间(日期)" ValidationGroup="submit"></asp:RequiredFieldValidator> 
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="ddlDepHH"
    Display="None" ErrorMessage="请输入到达时间(小时)" ValidationGroup="submit"></asp:RequiredFieldValidator> 
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="ddlDepMM"
    Display="None" ErrorMessage="请输入到达时间(分钟)" ValidationGroup="submit"></asp:RequiredFieldValidator> 
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="ddlArrHH"
    Display="None" ErrorMessage="请输入完成时间(小时)" ValidationGroup="submit"></asp:RequiredFieldValidator> 
<asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="ddlArrMM"
    Display="None" ErrorMessage="请输入完成时间(分钟)" ValidationGroup="submit"></asp:RequiredFieldValidator> 
    
    <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToValidate="DepTime" 
    Display="None" ErrorMessage="到达时间格式错误[yyyy-MM-dd]"  ValidationGroup="submit" Operator="DataTypeCheck" Type="Date" ></asp:CompareValidator>
    <asp:CompareValidator ID="CompareValidator2" runat="server" ControlToValidate="ArrTime" 
    Display="None" ErrorMessage="完成时间格式错误[yyyy-MM-dd]"  ValidationGroup="submit" Operator="DataTypeCheck" Type="Date" ></asp:CompareValidator>
    <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server"
   ErrorMessage="到达时间(小时):请输入整数!" ControlToValidate="ddlDepHH" Display="None" ValidationExpression="^[0-9]*$" ValidationGroup="submit"></asp:RegularExpressionValidator>   
   <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server"
   ErrorMessage="到达时间(分钟):请输入整数!" ControlToValidate="ddlDepMM" Display="None" ValidationExpression="^[0-9]*$" ValidationGroup="submit"></asp:RegularExpressionValidator> 
   <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" 
   ErrorMessage="完成时间(小时):请输入整数!" ControlToValidate="ddlArrHH" Display="None" ValidationExpression="^[0-9]*$" ValidationGroup="submit"></asp:RegularExpressionValidator>   
   <asp:RegularExpressionValidator ID="RegularExpressionValidator6" runat="server"
   ErrorMessage="完成时间(分钟):请输入整数!" ControlToValidate="ddlArrMM" Display="None" ValidationExpression="^[0-9]*$" ValidationGroup="submit"></asp:RegularExpressionValidator>  
   <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
   ErrorMessage="非工作时间:请输入整数(小时数)" ControlToValidate="ddlHHdis" Display="None" ValidationExpression="^[0-9]*$" ValidationGroup="submit"></asp:RegularExpressionValidator>   
<asp:ValidationSummary ID="ValidationSummary1" runat="server" EnableViewState="False"
    ShowMessageBox="True" ShowSummary="False" ValidationGroup="submit" />   
 
<asp:ValidationSummary ID="ValidationSummary2" runat="server" EnableViewState="False"
    ShowMessageBox="True" ShowSummary="False" ValidationGroup="export" />    
</asp:Content>
